From 32d48e594d48deeaa13f0a9ed82bf22e9c9ac567 Mon Sep 17 00:00:00 2001 From: Boris Ostrovsky Date: Tue, 5 Feb 2013 15:18:18 +0100 Subject: [PATCH] ACPI: acpi_table_parse() should return handler's error code Currently, the error code returned by acpi_table_parse()'s handler is ignored. This patch will propagate handler's return value to acpi_table_parse()'s caller. Signed-off-by: Boris Ostrovsky Committed-by: Jan Beulich --- xen/drivers/acpi/tables.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c index d70ffecdde..08e8f3bac4 100644 --- a/xen/drivers/acpi/tables.c +++ b/xen/drivers/acpi/tables.c @@ -265,7 +265,7 @@ acpi_table_parse_madt(enum acpi_madt_type id, * @handler: handler to run * * Scan the ACPI System Descriptor Table (STD) for a table matching @id, - * run @handler on it. Return 0 if table found, return on if not. + * run @handler on it. */ int __init acpi_table_parse(char *id, acpi_table_handler handler) { @@ -280,8 +280,7 @@ int __init acpi_table_parse(char *id, acpi_table_handler handler) acpi_get_table(id, 0, &table); if (table) { - handler(table); - return 0; + return handler(table); } else return 1; } -- 2.30.2